package com.linkage.lcims.base.po.business;

import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="BD_SERVICE_TYPE"
 *     
*/
@SuppressWarnings("serial")
public class BdServiceType implements Serializable {

    /** identifier field */
    private Integer servicetype;

    /** persistent field */
    private String name;

    /** nullable persistent field */
    private String accesstypelist;

    /** nullable persistent field */
    private String usertypelist;

    /** nullable persistent field */
    private String description;

    /** full constructor */
    public BdServiceType(Integer servicetype, String name, String accesstypelist, String usertypelist, String description) {
        this.servicetype = servicetype;
        this.name = name;
        this.accesstypelist = accesstypelist;
        this.usertypelist = usertypelist;
        this.description = description;
    }

    /** default constructor */
    public BdServiceType() {
    }

    /** minimal constructor */
    public BdServiceType(Integer servicetype, String name) {
        this.servicetype = servicetype;
        this.name = name;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.Integer"
     *             column="servicetype"
     *         
     */
    public Integer getServicetype() {
        return this.servicetype;
    }

    public void setServicetype(Integer servicetype) {
        this.servicetype = servicetype;
    }

    /** 
     *            @hibernate.property
     *             column="name"
     *             length="50"
     *             not-null="true"
     *         
     */
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /** 
     *            @hibernate.property
     *             column="accesstypelist"
     *             length="10"
     *         
     */
    public String getAccesstypelist() {
        return this.accesstypelist;
    }

    public void setAccesstypelist(String accesstypelist) {
        this.accesstypelist = accesstypelist;
    }

    /** 
     *            @hibernate.property
     *             column="usertypelist"
     *             length="20"
     *         
     */
    public String getUsertypelist() {
        return this.usertypelist;
    }

    public void setUsertypelist(String usertypelist) {
        this.usertypelist = usertypelist;
    }

    /** 
     *            @hibernate.property
     *             column="description"
     *             length="100"
     *         
     */
    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("servicetype", getServicetype())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof BdServiceType) ) return false;
        BdServiceType castOther = (BdServiceType) other;
        return new EqualsBuilder()
            .append(this.getServicetype(), castOther.getServicetype())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getServicetype())
            .toHashCode();
    }

}
